第16 步:让我们尝试更多的测试用例,并确保程序按我们希望的方式运行。
- 我们的循环不是无限的!从while循环中删除这段代码: print( "Infinite · loop!" )
- 点击运行并输入单词error 。当你猜到r时会发生什么?
- 用一些其他的话来试试while循环的效果。试试像密西西比、香蕉或土豚这样的词!
- 查看现在包含在while循环中的代码。它如何防止while循环无限?
To navigate the page using the TAB key, first press ESC to exit the code editor.